package com.luxiu.extensionlib.cardView

import android.content.Context
import android.util.AttributeSet
import android.view.ViewGroup
import android.widget.ImageView

class ExtensionCardView(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
    AnimationCardView(context, attrs, defStyleAttr) {

    constructor(context: Context) : this(context, null)

    constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0)

    init {
        isEnabled = true
        isClickable = true
        isSelected = true
//            descendantFocusability = FOCUS_BLOCK_DESCENDANTS
        elevation = 0.0f

        val params = LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
        val baseBoard = ImageView(context)
        baseBoard.scaleType = ImageView.ScaleType.FIT_XY
        addView(baseBoard, 0, params)
        baseBoard.isSelected = true
    }
}